﻿@{
    ViewBag.Title = "忘记密码";
    Layout = "~/Views/Shared/Main.cshtml";
    TempData["sidecalss"] = "EveryDayWisdom";

    var SearchParma = ViewData["SearchParma"] as HanGu.Entity.UniversallySearchParam ?? new HanGu.Entity.UniversallySearchParam();

}
@section Header
{


    <style>
        .contentLeft
        {
            width: 100%;
        }
        #partContent
        {
            width: 100%;
        }
        .movieContain
        {
            width: 100%;
            margin-top: 5px;
        }
    </style>

    
}
@section Banner
{
    @Html.Partial("Banner")
}
@section Content{
    <div class="contentLeft">
        <table cellpadding="0" cellspacing="0" id="partContent">
            <tr>
                <td>
                    <div class="ContentTitle">
                        <div class="ContentTitleLeft">
                            <img src="/Content/images/vipmyhanguTitle.gif" width="145" height="26" alt=""></div>
                        <div class="ContentTitleRight">
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="content">
                    <table cellpadding="0" cellspacing="0">
                        <tr>
                            <td>
                                <img src="/Content/images/zzjt.png" width="400" />
                            </td>
                            <td>
                                <div class="loginForm">
                                    <form action="/vip/forgetpwd" id="forgetpwdForm">
                                    <p>
                                        <label>
                                            用户名：</label>
                                        <input type="text" name="User" id="User" class="required" style="width: 150px" />
                                    </p>
                                   <p>
                                        <label>
                                            邮&nbsp;&nbsp;箱：</label>
                                        <input type="text" name="email" id="email" class="required email" style="width: 150px" /><span style="color:Red">必须与注册时邮箱相同</span>
                                    </p>
                                    <div class="login_bar">
                                    <div style="width:60px; float:left"><input class="sub" type="submit" value="确定" style="width:50px"/></div>
                                                                            
                                    </div>
                                    </form>
                                </div>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
}
@section Side{
    @Html.Partial("Side")
}
<script>
    $(function () {
        $("#forgetpwdForm").validate(
    { submitHandler: function (_this) {
        $this = $(_this);
        var user = $("#User", $this).val();
        var email = $("#email", $this).val();
        $.ajax({
            type: "POST",
            url: "/vip/forgetpwd",
            data: "UserName=" + user +  "&Email=" + email,
            success: function (data) {
                var json = eval("(" + data + ")");
                if (json.statusCode == 200) {
                    alert("设置成功，请查看您的邮箱");
                }
                else {
                    alert(json.message);
                }
            }
        });
    }
    }
);
    });
    </script>